clear;
clc;

%% Preset Parameters
% Benchmark Parameters
StdVec          =   [1 1 1 -1 -1 60 -10]'*0.01/4;
Param_Benchmark =   struct('KAPPA',0.00/4,'XI',1/82.5/4,'Pir_SS',0.02/4,...
                            'Flag_dE',0,'Flag_Price',0,...
                            'B_Total_SS',0.91,'b_lb',-0.29,...
                            'TrProb_H',0.96,'Prob_H',0.37,...
                            'TrProb_ext',0.92,'Prob_ext',0.33,...
                            'Fin_DomShare',0.79,'Fin_AdjCost',0.8,...
                            'Cons_FracH',0.60,...
                            'RHO_M_dom',0.68,'RHO_M_ext',0.81,'RHO_Y_H',0.50,'RHO_p_F',0.90,...
                            'Taylor_Pi',1.1,'Taylor_ir',0.87,...
                            'Cons_ElasTN',6.19,'Cons_ElasHF',6.19);


%% Generate Different Results
% Financial Integration
fprintf(['Solving the model with Low Financial Integration Degree: \n']);
TempParam       =   Param_Benchmark;
TempParam.Prob_ext= Param_Benchmark.Prob_ext/2;
    
SOLUTION_Fin    =   Solver_Main(Setup_PP(TempParam),StdVec);

% Real Integration
fprintf(['Solving the model with Low Real Integration Degree: \n']);
TempParam       =   Param_Benchmark;
TempParam.Prob_H=   Param_Benchmark.Prob_H/2;

SOLUTION_Real   =   Solver_Main(Setup_PP(TempParam),StdVec);

% Both
fprintf(['Solving the model with Low Real and Financial Integration Degree: \n']);
TempParam       =   Param_Benchmark;
TempParam.Prob_ext= Param_Benchmark.Prob_ext/2;
TempParam.Prob_H=   Param_Benchmark.Prob_H/2;

SOLUTION_Both   =   Solver_Main(Setup_PP(TempParam),StdVec);


save('Results_HighVsLowIntegrationDegree.mat','SOLUTION_Fin','SOLUTION_Real','SOLUTION_Both','-v7.3');
